/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author HuyNVK
 */
@Embeddable
public class EmployeeprojectPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ProjectID")
    private String projectID;
    @Basic(optional = false)
    @Column(name = "EmployeeID")
    private int employeeID;

    public EmployeeprojectPK() {
    }

    public EmployeeprojectPK(String projectID, int employeeID) {
        this.projectID = projectID;
        this.employeeID = employeeID;
    }

    public String getProjectID() {
        return projectID;
    }

    public void setProjectID(String projectID) {
        this.projectID = projectID;
    }

    public int getEmployeeID() {
        return employeeID;
    }

    public void setEmployeeID(int employeeID) {
        this.employeeID = employeeID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (projectID != null ? projectID.hashCode() : 0);
        hash += (int) employeeID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmployeeprojectPK)) {
            return false;
        }
        EmployeeprojectPK other = (EmployeeprojectPK) object;
        if ((this.projectID == null && other.projectID != null) || (this.projectID != null && !this.projectID.equals(other.projectID))) {
            return false;
        }
        if (this.employeeID != other.employeeID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.EmployeeprojectPK[ projectID=" + projectID + ", employeeID=" + employeeID + " ]";
    }
    
}
